package PMIRPConstDefs;


/**
 * Generated from IDL struct "ThresholdPackElement".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at 2013-5-20 22:07:19
 */

public final class ThresholdPackElementHelper
{
	private static org.omg.CORBA.TypeCode _type = null;
	public static org.omg.CORBA.TypeCode type ()
	{
		if (_type == null)
		{
			_type = org.omg.CORBA.ORB.init().create_struct_tc(PMIRPConstDefs.ThresholdPackElementHelper.id(),"ThresholdPackElement",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("threshold_value", PMIRPConstDefs.ThresholdValueHelper.type(), null),new org.omg.CORBA.StructMember("severity_", PMIRPConstDefs.SeverityHelper.type(), null),new org.omg.CORBA.StructMember("hysteresis_", PMIRPConstDefs.HysteresisHelper.type(), null)});
		}
		return _type;
	}

	public static void insert (final org.omg.CORBA.Any any, final PMIRPConstDefs.ThresholdPackElement s)
	{
		any.type(type());
		write( any.create_output_stream(),s);
	}

	public static PMIRPConstDefs.ThresholdPackElement extract (final org.omg.CORBA.Any any)
	{
		return read(any.create_input_stream());
	}

	public static String id()
	{
		return "IDL:PMIRPConstDefs/ThresholdPackElement:1.0";
	}
	public static PMIRPConstDefs.ThresholdPackElement read (final org.omg.CORBA.portable.InputStream in)
	{
		PMIRPConstDefs.ThresholdPackElement result = new PMIRPConstDefs.ThresholdPackElement();
		result.threshold_value=in.read_any();
		result.severity_=PMIRPConstDefs.SeverityHelper.read(in);
		result.hysteresis_=PMIRPConstDefs.HysteresisHelper.read(in);
		return result;
	}
	public static void write (final org.omg.CORBA.portable.OutputStream out, final PMIRPConstDefs.ThresholdPackElement s)
	{
		out.write_any(s.threshold_value);
		PMIRPConstDefs.SeverityHelper.write(out,s.severity_);
		PMIRPConstDefs.HysteresisHelper.write(out,s.hysteresis_);
	}
}
